package com.example.cshaoshao.demo.activities;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import android.widget.Toast;

import com.example.cshaoshao.demo.R;
import com.example.cshaoshao.demo.entities.CallParm;
import com.example.cshaoshao.demo.entities.Message;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends AppCompatActivity implements CallParm {
    @BindView(R.id.textview4)
    TextView textView;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
        Message message=new Message(this);
        message.getData();
    }

    @Override
    public void successful(List<String> list) {
        textView.setText(list+"");
    }

    @Override
    public void failed(String e) {
        Toast.makeText(MainActivity.this,e,Toast.LENGTH_SHORT).show();
    }
}
